using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JW.Framework.IOC.Attributes
{
    /// <summary>
    /// 拦截器属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
    public sealed class InterceptorAttribute : Attribute
    {
        public InterceptorAttribute(params Type[] interceptorTypes)
        {
            InterceptorTypes = interceptorTypes;
        }

        public Type[] InterceptorTypes { get; set; }

        public bool HasInterceptor => this.InterceptorTypes?.Length > 0;
    }
}
